<%--
  Created by IntelliJ IDEA.
  User: 86155
  Date: 2022/2/23
  Time: 10:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>Title</title>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>注册账号</title>
<%--  <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon">--%>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/css/common-style.css">
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/regist.css">
  <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.min.js"></script>
  <script src="${pageContext.request.contextPath}/js/jquery.md5.js"></script>、
  <script src="${pageContext.request.contextPath}/js/jsencrypt.min.js"></script>
</head>
<body>
<div class="main">
  <div class="box">
    <div class="title-box">
      <div class="head">
        欢迎注册宠宠欲动
      </div>
      <div class="tips">
                    <span class="tips-text">
                        已有账号？
                    </span>
        <a class="tips-link" target="_top" href="">点此登录</a>
      </div>
    </div>
    <div id="container">
      <div class="schema-form">
        <form action="${pageContext.request.contextPath}/customer" method="POST" id="form">
          <div class="form-box">
            <div class="form-content">
              <!-- //用户名 -->
              <div class="input_box">
                <div class="input_box_control">
                                        <span class="next-input">
                                            <input id="name" type="text" name="custumerName" placeholder="请输入账号昵称">
                                        </span>
                  <div id="error_box"><br></div>
                </div>
              </div>

              <!-- //密码 -->
              <div class="input_box">
                <div class="input_box_control">
                                        <span class="next-input">
                                            <input id="upwd" type="password" name="custumerPsw" placeholder="请设置登录密码">
                                        </span>
                  <div id="error_box2"><br></div>
                </div>
              </div>

              <!-- //确认密码 -->
              <div class="input_box">
                <div class="input_box_control">
                                        <span class="next-input">
                                            <input id="upwd2" type="password" name="cusPwd2" placeholder="请再次输入登录密码">
                                        </span>
                  <div id="error_box3"><br></div>
                </div>
              </div>
              <!-- //手机号 -->

              <div class="input_box">
                <div class="input_box_control">
                                        <span class="next-input">
                                            <input id="email" type="tel" name="custumerTel" required placeholder="请输入手机号码">
                                        </span>
                  <div id="error_box4"><br></div>
                </div>
              </div>

<%--              <!-- //验证码 -->--%>
<%--              <div class="input_box">--%>
<%--                <div class="input_box_control">--%>
<%--                                        <span class="next-input">--%>
<%--                                            <input type="text" size="" name="u_code" id="u_code"--%>
<%--                                                   placeholder="请输入正确的验证码">--%>
<%--                                            <input type="button" id="yzm" onclick="sendMessage();" name="获取验证码"--%>
<%--                                                   value="发送验证码">--%>
<%--                                        </span>--%>
<%--                  <div id="error_box5"><br></div>--%>
<%--                </div>--%>
<%--              </div>--%>

              <div class="input_box">
                <input type="button" onclick="getFormData();foLogin()" class="btn" id="tz"
                       value="立即注册">
              </div>
            </div>
          </div>

        </form>
      </div>
    </div>
  </div>
</div>

</div>
<div id="con"></div>

<%--<script>--%>
<%--  var PUBLIC_KEY = '';--%>

<%--  $(".btn").click(function () {--%>

<%--    $.ajax({--%>
<%--      type: "GET",--%>
<%--      url: "${pageContext.request.contextPath}/publickey",--%>
<%--      dataType: 'json',--%>
<%--      success: function (result) {--%>
<%--        PUBLIC_KEY = result.data; //获得公钥--%>

<%--        var encrypt = new JSEncrypt();--%>
<%--        encrypt.setPublicKey('-----BEGIN PUBLIC KEY-----' + PUBLIC_KEY + '-----END PUBLIC KEY-----');--%>

<%--        var password = $("#upwd").val();--%>

<%--        var encrypted = encrypt.encrypt(password);--%>

<%--        console.log('公钥：%o',PUBLIC_KEY);--%>
<%--        console.log('加密后的数据：%o', encrypted);--%>

<%--        $("#upwd").val(encrypted);--%>
<%--        $("#upwd2").val(encrypted);--%>



<%--      }--%>
<%--    })--%>

<%--  })--%>
<%--</script>--%>


<script type="text/javascript" src='${pageContext.request.contextPath}/js/regist.js'></script>
</body>
</html>
